package com.czl.base.data.api

import com.czl.base.base.BaseBean
import com.czl.base.data.bean.tengyun.*
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.POST

/**
 * @author by xubin,
 * @date on 2022/1/17.
 * PS: Not easy to write code, please indicate.
 */
interface TengYunApiService {

    @POST("system/2_0/selectCompanyByModule")
    fun selectCompanyByModule(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<CompanyBean>>>

    @POST("system/2_0/selectOrganization")
    fun selectOrganization(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<OrgBean>>>

    @POST("system/2_0/getUserListByOrgIds")
    fun getUserListByOrgIds(
        @Body info: RequestBody
    ): Observable<BaseBean<MutableList<UserBean>>>

    /**
     * 添加设施
     */
    @POST("facility/2_0/prepare/addProfitFacility")
    fun addProfitFacility(
        @Body info: RequestBody
    ): Observable<BaseBean<FacilityBean>>

    /**
     * 设施盘盈登记
     */
    @POST("facility/3_0/inventory/SummaryInventoryFacility")
    fun summaryInventoryFacility(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 添加盘点说明
     */
    @POST("facility/3_0/inventory/addInventoryNote")
    fun addInventoryNote(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 设施code查询设施信息
     */
    @POST("facility/2_0/facility/getFacilityByNo")
    fun getFacilityByNo(
        @Body info: RequestBody
    ): Observable<BaseBean<FacilityBean>>
    /**
     * 设施code查询设施信息
     */
    @POST("facility/3_0/inventory/wechatSelectFacilityInfo")
    fun wechatSelectFacilityInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<InventoryAssetBean>>

    /**
     * 删除盘盈设施
     */
    @POST("facility/3_0/inventory/deleteInventoryProfidByInventoryId")
    fun deleteInventoryProfidByInventoryId(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 提交成功
     */
    @POST("facility/3_0/inventory/summaryTask")
    fun summaryTask(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 根据areaId查询projectId
     */
    @POST("system/2_0/SysCommunityController/getIdByNeighNo")
    fun getIdByNeighNo(
        @Body info: RequestBody
    ): Observable<BaseBean<Int>>

    /**
     * 获取大客户仓库信息列表
     */
    @POST("storehouse/2_0/getStorehouseByUserId")
    fun getStorehouseByUserId(
        @Body info: RequestBody
    ): Observable<BaseBean<StorehouseBean>>

    @POST("storehouse/2_0/getOrgUseManageStorehouse")
    fun getOrgUseManageStorehouse(
        @Body info: RequestBody
    ): Observable<BaseBean<StorehouseBean>>

    @POST("storehouse/2_0/getSortAllList")
    fun getSortAllList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<SortBean>>>

    /**
     * 获取首页数据
     */
    @POST("storehouse/2_0/getAPPIndexTotal")
    fun getAPPIndexTotal(
        @Body info: RequestBody
    ): Observable<BaseBean<StorehouseBean>>

    /**
     * 获取分类物品
     */
    @POST("storehouse/2_0/getSortList")
    fun getSortList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<SortBean>>>

    /**
     * 添加物品
     */
    @POST("storehouse/2_0/addSortInfo")
    fun addSortInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<SortBean>>

    /**
     * 获取仓库物品分类
     */
    @POST("storehouse/2_0/getClassStockList")
    fun getClassStockList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<CategoryBean>>>

    /**
     * 查询我的采购申请列表
     */
    @POST("purchase/2_0/application/WXgetMyPurchaseApplicationList")
    fun WXgetMyPurchaseApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<PurchaseBean>>>

    /**
     * 查询我的采购申请列表
     */
    @POST("purchase/2_0/application/getApplicationList")
    fun getPurchaseApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<PurchaseBean>>>

    /**
     * 查询我的采购申请列表
     */
    @POST("purchase/2_0/application/addApplication")
    fun addApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 查询采购单列表
     */
    @POST("purchase/2_0/card/getCardListInUseApplication")
    fun getCardListInUseApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<PurchaseOrderBean>>>

    /**
     * 根据采购单Id查采购物品
     */
    @POST("storehouse/2_0/getPurchaseStorageSortList")
    fun getPurchaseStorageSortList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<SortBean>>>

    /**
     * 查询我的领用申请
     */
    @POST("facility/3_0/WXGetMyApplicationList")
    fun WXGetMyApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<UsageBean>>>

    /**
     * 新增领用申请
     */
    @POST("facility/3_0/addUseApplication")
    fun addUseApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 新增调拨申请
     */
    @POST("storehouse/2_0/addApplyInfo")
    fun addApplyInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 查询提交权限
     */
    @POST("activiti/model/getRoleProcessList")
    fun getRoleProcessList(
        @Body info: RequestBody
    ): Observable<BaseBean<List<Any?>>>

    /**
     * 查询仓库调拨提交权限
     */
    @POST("system/3_0/isFacilityManagerByUserIdAndCompanyId")
    fun isFacilityManagerByUserIdAndCompanyId(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 查询仓库信息
     */
    @POST("storehouse/2_0/getManageCompanystorehouseList")
    fun getManageCompanystorehouseList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<StoreHouseListBean>>>

    /**
     * 查询我的领用申请明细
     */
    @POST("facility/3_0/WXGetApplicationInfo")
    fun WXGetApplicationInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<UsageBean>>

    /**
     * 查询是否可以撤回
     */
    @POST("activiti/task/isCanCancel")
    fun isCanCancel(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 撤回审批
     */
    @POST("facility/3_0/WXApprpveApplication")
    fun wxApprpveApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    @POST("facility/3_0/handle/WXApprpveApplication")
    fun wxApprpveApplicationHandle(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 仓库撤回审批
     */
    @POST("storehouse/2_0/approveMoveApplication")
    fun approveMoveApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 采购撤回审批
     */
    @POST("purchase/2_0/application/checkApplication")
    fun checkApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 审批通过
     */
    @POST("activiti/task/nextTaskProcess")
    fun nextTaskProcess(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 审批驳回
     */
    @POST("activiti/task/hangUpTaskProcess")
    fun hangUpTaskProcess(
        @Body info: RequestBody
    ): Observable<BaseBean<Any?>>

    /**
     * 查询采购申请明细
     */
    @POST("purchase/2_0/application/selectApplication")
    fun selectApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<PurchaseBean>>

    /**
     * 添加处置申请明细
     */
    @POST("facility/3_0/handle/addAssetApplication")
    fun addAssetApplication(
        @Body info: RequestBody
    ): Observable<BaseBean<AssetHandleBean>>

    /**
     * 查询处置申请明细
     */
    @POST("facility/3_0/handle/selectHandleApplicationByHandleApplicationId")
    fun selectHandleApplicationByHandleApplicationId(
        @Body info: RequestBody
    ): Observable<BaseBean<AssetHandleBean>>

    /**
     * 查询我的领用申请审核
     */
    @POST("facility/3_0/getUserApprovalList")
    fun getUserApprovalList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<UsageBean>>>

    /**
     * 查询我的调拨申请列表
     */
    @POST("storehouse/2_0/wechatGetMyMoveApplicationList")
    fun wechatGetMyMoveApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<StoreMoveBean>>>

    /**
     * 查询我的调拨申请明细
     */
    @POST("storehouse/2_0/getMoveInfo")
    fun getMoveInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<StoreMoveBean>>

    /**
     * 查询我的调拨申请审核
     */
    @POST("storehouse/2_0/getMoveApplicationList")
    fun getMoveApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<StoreMoveBean>>>

    /**
     * 查询我的调拨申请审核
     */
    @POST("storehouse/2_0/getStorehouseStockInfo")
    fun getStorehouseStockInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<SortBean>>>

    /**
     * 查询在用待处置资产
     */
    @POST("facility/3_0/selectFacilityListInUseByCompanyIdAndUserId")
    fun selectFacilityListInUseByCompanyIdAndUserId(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleFacilityBean>>>

    /**
     * 查询库存待处置资产
     */
    @POST("facility/3_0/selectFacilityListInStroerHouseByCompanyIdAndUserId")
    fun selectFacilityListInStroerHouseByCompanyIdAndUserId(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleFacilityBean>>>

    /**
     * 查询仓库损坏待处置资产
     */
    @POST("storehouse/2_0/getProcessDamageProList")
    fun getProcessDamageProList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleFacilityBean>>>

    /**
     * 查询盘亏待处置资产
     */
    @POST("facility/3_0/selectFacilityListInInventoryLoss")
    fun selectFacilityListInInventoryLoss(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleFacilityBean>>>

    /**
     * 查询低耗在用物品
     */
    @POST("storehouse/2_0/getProcessSortUseInfo")
    fun getProcessSortUseInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<MutableList<AssetHandleSortBean>>>

    /**
     * 查询低耗在用单品
     */
    @POST("storehouse/2_0/getProcessProUseInfo")
    fun getProcessProUseInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<MutableList<AssetHandleSortBean>>>

    /**
     * 查询低耗库存物品
     */
    @POST("storehouse/2_0/getProcessSortStockInfo")
    fun getProcessSortStockInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<MutableList<AssetHandleSortBean>>>

    /**
     * 查询低耗库存单品
     */
    @POST("storehouse/2_0/getProcessProStockInfo")
    fun getProcessProStockInfo(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleSortBean>>>

    /**
     * 查询低耗损坏物品
     */
    @POST("storehouse/2_0/getProcessDamageSortList")
    fun getProcessDamageSortList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleSortBean>>>

    /**
     * 查询低耗损坏单品
     */
    @POST("storehouse/2_0/getProcessDamageProList")
    fun getProcessDamageProListStore(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleSortBean>>>

    /**
     * 查询低耗盘亏物品
     */
    @POST("storehouse/2_0/getProcessInventorySortList")
    fun getProcessInventorySortList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleSortBean>>>

    /**
     * 查询低耗盘亏单品
     */
    @POST("storehouse/2_0/getProcessInventoryProList")
    fun getProcessInventoryProList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleSortBean>>>

    /**
     * 查询我的资产处置申请列表
     */
    @POST("facility/3_0/handle/selectMyHandleApplicationList")
    fun selectMyHandleApplicationList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<AssetHandleBean>>>

    /**
     * 审批数据查询
     */
    @POST("activiti/process/getProcessListBySearch")
    fun getProcessListBySearch(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<ApproveBean>>>

    @POST("activiti/task/getTaskListBySearch")
    fun getTaskListBySearch(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<ApproveBean>>>

    @POST("activiti/process/getTaskUserByRelationId?")
    fun getTaskUserByRelationId(
        @Body info: RequestBody
    ): Observable<BaseBean<List<TaskUserBean>>>

    @POST("activiti/task/searchUsers")
    fun searchUsers(
        @Body info: RequestBody
    ): Observable<BaseBean<TaskUserBean>>

    @POST("facility/3_0/inventory/wechatGetMyTaskList")
    fun wechatGetMyTaskList(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<InventoryAssetBean>>>

    @POST("facility/3_0/inventory/wechatGetTaskFacilityInfoCountByTaskId")
    fun wechatGetTaskFacilityInfoCountByTaskId(
        @Body info: RequestBody
    ): Observable<BaseBean<InventoryAssetCountBean>>

    @POST("facility/3_0/inventory/wechatGetTaskFacilityInfoByTaskId")
    fun wechatGetTaskFacilityInfoByTaskId(
        @Body info: RequestBody
    ): Observable<BaseBean<ListBean<InventoryAssetBean>>>

    @POST("standard/3_0/facility/getclassificationlistCompany")
    fun getclassificationlistCompany(
        @Body info: RequestBody
    ): Observable<BaseBean<List<CategoryBean>>>

    @POST("facility/3_0/rule/getFacilityNoByRule")
    fun getFacilityNoByRule(
        @Body info: RequestBody
    ): Observable<BaseBean<String?>>
}